<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Ananas Library: Исходный файл aform.h</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Создано системой Doxygen 1.5.6 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Титульная&nbsp;страница</span></a></li>
      <li><a href="annotated.html"><span>Классы</span></a></li>
      <li class="current"><a href="files.html"><span>Файлы</span></a></li>
    </ul>
  </div>
<h1>aform.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/****************************************************************************</span>
<a name="l00002"></a>00002 <span class="comment">** $Id: aform.h,v 1.31 2007/03/31 14:34:20 app Exp $</span>
<a name="l00003"></a>00003 <span class="comment">**</span>
<a name="l00004"></a>00004 <span class="comment">** Header file of Ananas forms of Ananas</span>
<a name="l00005"></a>00005 <span class="comment">** Designer and Engine applications</span>
<a name="l00006"></a>00006 <span class="comment">**</span>
<a name="l00007"></a>00007 <span class="comment">** Created : 20031201</span>
<a name="l00008"></a>00008 <span class="comment">**</span>
<a name="l00009"></a>00009 <span class="comment">** Copyright (C) 2003-2004 Leader InfoTech.  All rights reserved.</span>
<a name="l00010"></a>00010 <span class="comment">** Copyright (C) 2003-2005 Grigory Panov &lt;gr1313 at mail.ru&gt;, Yoshkar-Ola.</span>
<a name="l00011"></a>00011 <span class="comment">**</span>
<a name="l00012"></a>00012 <span class="comment">** This file is part of the Library of the Ananas</span>
<a name="l00013"></a>00013 <span class="comment">** automation accounting system.</span>
<a name="l00014"></a>00014 <span class="comment">**</span>
<a name="l00015"></a>00015 <span class="comment">** This file may be distributed and/or modified under the terms of the</span>
<a name="l00016"></a>00016 <span class="comment">** GNU General Public License version 2 as published by the Free Software</span>
<a name="l00017"></a>00017 <span class="comment">** Foundation and appearing in the file LICENSE.GPL included in the</span>
<a name="l00018"></a>00018 <span class="comment">** packaging of this file.</span>
<a name="l00019"></a>00019 <span class="comment">**</span>
<a name="l00020"></a>00020 <span class="comment">** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE</span>
<a name="l00021"></a>00021 <span class="comment">** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.</span>
<a name="l00022"></a>00022 <span class="comment">**</span>
<a name="l00023"></a>00023 <span class="comment">** See http://www.leaderit.ru/page=ananas or email sales@leaderit.ru</span>
<a name="l00024"></a>00024 <span class="comment">** See http://www.leaderit.ru/gpl/ for GPL licensing information.</span>
<a name="l00025"></a>00025 <span class="comment">**</span>
<a name="l00026"></a>00026 <span class="comment">** Contact org@leaderit.ru if any conditions of this licensing are</span>
<a name="l00027"></a>00027 <span class="comment">** not clear to you.</span>
<a name="l00028"></a>00028 <span class="comment">**</span>
<a name="l00029"></a>00029 <span class="comment">**********************************************************************/</span>
<a name="l00030"></a>00030 
<a name="l00033"></a>00033 <span class="preprocessor">#ifndef AFORM_H</span>
<a name="l00034"></a>00034 <span class="preprocessor"></span><span class="preprocessor">#define AFORM_H</span>
<a name="l00035"></a>00035 <span class="preprocessor"></span>
<a name="l00036"></a>00036 <span class="preprocessor">#include "ananasglobal.h"</span>
<a name="l00037"></a>00037 
<a name="l00038"></a>00038 <span class="preprocessor">#include &lt;qobject.h&gt;</span>
<a name="l00039"></a>00039 <span class="preprocessor">#include &lt;qbuttongroup.h&gt;</span>
<a name="l00040"></a>00040 <span class="preprocessor">#include &lt;qsproject.h&gt;</span>
<a name="l00041"></a>00041 <span class="preprocessor">#include &lt;qsinterpreter.h&gt;</span>
<a name="l00042"></a>00042 <span class="preprocessor">#include &lt;qsargument.h&gt;</span>
<a name="l00043"></a>00043 <span class="preprocessor">#include &lt;qmutex.h&gt;</span>
<a name="l00044"></a>00044 
<a name="l00045"></a>00045 <span class="preprocessor">#include "engine.h"</span>
<a name="l00046"></a>00046 <span class="preprocessor">#include "adatabase.h"</span>
<a name="l00047"></a>00047 <span class="preprocessor">#include "adocument.h"</span>
<a name="l00048"></a>00048 <span class="preprocessor">#include "acfg.h"</span>
<a name="l00049"></a>00049 
<a name="l00050"></a>00050 
<a name="l00051"></a>00051 <span class="keyword">class </span>QWidget;
<a name="l00052"></a>00052 <span class="keyword">class </span>QSqlForm;
<a name="l00053"></a>00053 <span class="keyword">class </span><a class="code" href="classaWidget.html" title="Базовый класс для визуальных объектов. Наследует...">aWidget</a>;
<a name="l00054"></a>00054 
<a name="l00055"></a>00055 
<a name="l00056"></a>00056 
<a name="l00074"></a><a class="code" href="classaForm.html">00074</a> <span class="keyword">class  </span>ANANAS_EXPORT <a class="code" href="classaForm.html" title="Определяет программный интерфейс экранных форм...">aForm</a> : <span class="keyword">public</span> QObject
<a name="l00075"></a>00075 {
<a name="l00076"></a>00076         Q_OBJECT
<a name="l00077"></a>00077 <span class="keyword">public</span>:
<a name="l00078"></a>00078         <a class="code" href="classaEngine.html" title="Определяет программный интерфейс Runtime системы...">aEngine</a>*        engine;
<a name="l00079"></a>00079         <a class="code" href="classaDatabase.html" title="Класс для работы с СУБД. Ananas Data Abstraction Layer. Наследует...">aDatabase</a>*      db;
<a name="l00080"></a>00080         <a class="code" href="classaCfg.html" title="Класс реализует програмный интерфейс доступа...">aCfg</a>*           md;
<a name="l00081"></a>00081         aCfgItem        mdObj;
<a name="l00082"></a>00082         QWidget*        parentWidget;
<a name="l00083"></a>00083         <span class="keywordtype">bool</span>            closeAfterSelect;
<a name="l00084"></a>00084 
<a name="l00085"></a>00085         <a class="code" href="classaForm.html" title="Определяет программный интерфейс экранных форм...">aForm</a>();
<a name="l00086"></a>00086         <a class="code" href="classaForm.html" title="Определяет программный интерфейс экранных форм...">aForm</a>( QWidget *parent, <a class="code" href="classaEngine.html" title="Определяет программный интерфейс Runtime системы...">aEngine</a> *eng );
<a name="l00087"></a>00087         <a class="code" href="classaForm.html" title="Определяет программный интерфейс экранных форм...">aForm</a>( QWidget *parent,  <a class="code" href="classaEngine.html" title="Определяет программный интерфейс Runtime системы...">aEngine</a> *eng,  Q_ULONG form_mid = 0, <a class="code" href="classaWidget.html" title="Базовый класс для визуальных объектов. Наследует...">aWidget</a>* caller = NULL);
<a name="l00088"></a>00088         <a class="code" href="classaForm.html" title="Определяет программный интерфейс экранных форм...">aForm</a>( QWidget *parent,  <a class="code" href="classaEngine.html" title="Определяет программный интерфейс Runtime системы...">aEngine</a> *eng, QString oftype, QObject *aobj = NULL);
<a name="l00089"></a>00089         ~<a class="code" href="classaForm.html" title="Определяет программный интерфейс экранных форм...">aForm</a>();
<a name="l00090"></a>00090         QWidget *form;
<a name="l00091"></a>00091         <span class="keywordtype">void</span>            init();
<a name="l00092"></a>00092         QWidget*        aParent( QWidget *widget );
<a name="l00093"></a>00093         <span class="keywordtype">int</span>             New();
<a name="l00094"></a>00094         <span class="keywordtype">int</span>             Select( Q_ULLONG <span class="keywordtype">id</span> );
<a name="l00095"></a>00095         <span class="keywordtype">int</span>             SelectGroup( Q_ULLONG <span class="keywordtype">id</span> );
<a name="l00096"></a>00096         Q_ULLONG        selectedCatId(){ <span class="keywordflow">return</span> db_uid;} <span class="comment">// Return uid, selected in Catalogue</span>
<a name="l00097"></a>00097         Q_ULLONG        selectedId(){ <span class="keywordflow">return</span> id;} <span class="comment">// Return uid, selected in  main wDBTable</span>
<a name="l00098"></a>00098 signals:
<a name="l00099"></a>00099         <span class="keywordtype">void</span> selected( Q_ULLONG uid );
<a name="l00100"></a>00100         <span class="keywordtype">void</span> closeForm( Q_ULLONG );
<a name="l00101"></a>00101         <span class="keywordtype">void</span> changedData();
<a name="l00102"></a>00102         <span class="keywordtype">void</span> update( ANANAS_UID );
<a name="l00103"></a>00103 <span class="keyword">public</span>:
<a name="l00104"></a>00104 
<a name="l00105"></a>00105         QVariant        tabValue(<span class="keyword">const</span> QString &amp;tname, <span class="keywordtype">int</span> row, <span class="keywordtype">int</span> col, <span class="keywordtype">bool</span> dbval=<span class="keyword">false</span>);
<a name="l00106"></a>00106         <span class="keywordtype">void</span>            setMode(<span class="keywordtype">int</span> m);
<a name="l00107"></a>00107 
<a name="l00108"></a>00108 <span class="keyword">public</span> slots:
<a name="l00109"></a>00109 <span class="comment">//      QObject *       object(const QString &amp;name);</span>
<a name="l00110"></a>00110         <span class="keywordtype">void</span>            done( <span class="keywordtype">int</span> rc );
<a name="l00111"></a>00111         <span class="keywordtype">void</span>            Show();
<a name="l00112"></a>00112         <span class="keywordtype">void</span>            Close();
<a name="l00113"></a>00113         <span class="keywordtype">void</span>            show(); <span class="comment">//depricated</span>
<a name="l00114"></a>00114         <span class="keywordtype">void</span>            close(); <span class="comment">//depricated</span>
<a name="l00115"></a>00115         QVariant        Value(<span class="keyword">const</span> QString &amp;name);
<a name="l00116"></a>00116         QVariant        DBValue(<span class="keyword">const</span> QString &amp;name);
<a name="l00117"></a>00117         <span class="keywordtype">int</span>             SetValue(<span class="keyword">const</span> QString &amp;name, QVariant value);
<a name="l00118"></a>00118         <span class="keywordtype">int</span>             SetObjValue(<span class="keyword">const</span> QString &amp;name, <a class="code" href="classaObject.html" title="Базовый класс для невизуальных классов (моделей...">aObject</a> *value);
<a name="l00119"></a>00119         <span class="keywordtype">void</span>            SetColumnReadOnly(<span class="keyword">const</span> QString &amp;tname, <span class="keywordtype">int</span> numCol, <span class="keywordtype">bool</span> ro);
<a name="l00120"></a>00120         <span class="keywordtype">int</span>             ColIndex(<span class="keyword">const</span> QString &amp;tname, <span class="keyword">const</span> QString &amp;colname);
<a name="l00121"></a>00121         <span class="keywordtype">int</span>             TabCount(<span class="keyword">const</span> QString &amp;tname);
<a name="l00122"></a>00122 <span class="comment">//      QVariant        TabValue(const QString &amp;tname, const QString &amp;colname, int row =-1 );</span>
<a name="l00123"></a>00123         QVariant        TabValue(<span class="keyword">const</span> QString &amp;tname, <span class="keywordtype">int</span> row, <span class="keywordtype">int</span> col);
<a name="l00124"></a>00124         QVariant        TabDBValue(<span class="keyword">const</span> QString &amp;tname, <span class="keywordtype">int</span> row, <span class="keywordtype">int</span> col);
<a name="l00125"></a>00125         <span class="keywordtype">void</span>            TabNewLine(<span class="keyword">const</span> QString &amp;tname);
<a name="l00126"></a>00126         <span class="keywordtype">void</span>            TabUpdate(<span class="keyword">const</span> QString &amp;tname);
<a name="l00127"></a>00127 <span class="comment">//      QVariant        TabDBValue(const QString &amp;tname, const QString &amp;colname , int row =-1);</span>
<a name="l00128"></a>00128 <span class="comment">//      void            SetTabValue(const QString &amp;tname, const QString &amp;name, QVariant value);</span>
<a name="l00129"></a>00129         <span class="keywordtype">void</span>            SetTabValue(<span class="keyword">const</span> QString &amp;tname, <span class="keyword">const</span> QString &amp;colname, <span class="keywordtype">int</span> row, QVariant value);
<a name="l00130"></a>00130         <span class="keywordtype">void</span>            setfocus(QString fname);
<a name="l00131"></a>00131         <span class="keywordtype">void</span>            SetFocus();
<a name="l00132"></a>00132         ERR_Code        UpdateDB(); <span class="comment">// Обновить в БД</span>
<a name="l00133"></a>00133         ERR_Code        update(); <span class="comment">// Depricated</span>
<a name="l00134"></a>00134         <span class="keywordtype">int</span>             turn_on(); <span class="comment">// Depricated</span>
<a name="l00135"></a>00135         <span class="keywordtype">int</span>             turn_off(); <span class="comment">// Depricated</span>
<a name="l00136"></a>00136         <span class="keywordtype">int</span>             SignIn(); <span class="comment">// Провести документ</span>
<a name="l00137"></a>00137         <span class="keywordtype">int</span>             SignOut(); <span class="comment">// Отменить проведение документа</span>
<a name="l00138"></a>00138 <span class="comment">//      void            formClose();</span>
<a name="l00139"></a>00139         <span class="keywordtype">int</span>             Update();
<a name="l00140"></a>00140         <span class="keywordtype">void</span>            SetReadOnly( <span class="keywordtype">bool</span> status );
<a name="l00141"></a>00141         <span class="keywordtype">bool</span>            IsReadOnly();
<a name="l00142"></a>00142         <span class="keywordtype">int</span>             GetMode();
<a name="l00143"></a>00143                 
<a name="l00144"></a>00144         QString         Propis(         QString val ,  
<a name="l00145"></a>00145                                         <span class="keywordtype">bool</span> need_kopeyki=<span class="keyword">true</span>,
<a name="l00146"></a>00146                                         <span class="keywordtype">bool</span> male=<span class="keyword">true</span>,
<a name="l00147"></a>00147                                         <span class="keyword">const</span> QString &amp;end1=<span class="stringliteral">"рублей"</span>,
<a name="l00148"></a>00148                                         <span class="keyword">const</span> QString &amp;end2=<span class="stringliteral">"рубль"</span>,
<a name="l00149"></a>00149                                         <span class="keyword">const</span> QString &amp;end3=<span class="stringliteral">"рубля"</span>);
<a name="l00150"></a>00150         QString         MoneyToText( QString amount , QString currency ); 
<a name="l00151"></a>00151         QString         ConvertNumber2MoneyFormat(<span class="keywordtype">double</span> number);
<a name="l00152"></a>00152         QString         ConvertDateFromIso(<span class="keyword">const</span> QString &amp;ISODate);
<a name="l00153"></a>00153         QString         EndOfDay(<span class="keyword">const</span> QString&amp; ISODate);
<a name="l00154"></a>00154         
<a name="l00155"></a>00155         <span class="keywordtype">void</span>            SelectByCurrent(<a class="code" href="classaObject.html" title="Базовый класс для невизуальных классов (моделей...">aObject</a> *doc);
<a name="l00156"></a>00156         <span class="keywordtype">void</span>            SetCurrent(<a class="code" href="classaObject.html" title="Базовый класс для невизуальных классов (моделей...">aObject</a> *doc);
<a name="l00157"></a>00157         <a class="code" href="classaObject.html" title="Базовый класс для невизуальных классов (моделей...">aObject</a>*        Current();
<a name="l00158"></a>00158 
<a name="l00159"></a>00159         QWidget*        Widget( QString name );
<a name="l00160"></a>00160 
<a name="l00161"></a>00161 <span class="comment">// after compleete will remove  value() setValue()</span>
<a name="l00162"></a>00162 <span class="comment">//      aDataField*     getAttribute(const QString &amp;name);</span>
<a name="l00163"></a>00163 <span class="comment">//      int             setAttribute(const QString &amp;name, aDataField *value);</span>
<a name="l00164"></a>00164 
<a name="l00170"></a>00170 <span class="comment">//      char*           formMetaObjectId(QString fn);</span>
<a name="l00171"></a>00171 <span class="keyword">private</span> slots:
<a name="l00172"></a>00172         <span class="keywordtype">void</span> on_dbtablerow( QSqlRecord *r );
<a name="l00173"></a>00173         <span class="keywordtype">void</span> on_tabupdate( QSqlRecord *r );
<a name="l00174"></a>00174         <span class="keywordtype">void</span> on_button();<span class="comment">//int id);</span>
<a name="l00175"></a>00175         <span class="keywordtype">void</span> on_actionbutton();
<a name="l00176"></a>00176         <span class="keywordtype">void</span> on_form_close();
<a name="l00177"></a>00177         <span class="keywordtype">void</span> on_return();
<a name="l00178"></a>00178         <span class="keywordtype">void</span> on_lostfocus();
<a name="l00179"></a>00179         <span class="keywordtype">void</span> on_valueChanged(<span class="keyword">const</span> QString &amp;s);
<a name="l00180"></a>00180         <span class="keywordtype">void</span> on_valueChanged( <span class="keyword">const</span> QString &amp; name, <span class="keyword">const</span> QVariant &amp; value );
<a name="l00181"></a>00181         <span class="keywordtype">void</span> on_tabvalueChanged(<span class="keywordtype">int</span> row, <span class="keywordtype">int</span> col);
<a name="l00182"></a>00182         <span class="keywordtype">void</span> on_tabselected( Q_ULLONG uid );
<a name="l00183"></a>00183         <span class="keywordtype">void</span> on_event( <span class="keyword">const</span> QString &amp;source, <span class="keyword">const</span> QString &amp;data );
<a name="l00184"></a>00184         <span class="keywordtype">void</span> on_tablerow( Q_ULLONG uid );
<a name="l00185"></a>00185 <span class="comment">//      QObject *findWidget(QString name);</span>
<a name="l00186"></a>00186 <span class="comment">//      QString widgetName(QObject *w);</span>
<a name="l00187"></a>00187 <span class="comment">//      void openForm( int oid, int fid = 0 , int defaultfor = 1, int mode = 0, bool readonly = false );</span>
<a name="l00188"></a>00188         <span class="keywordtype">void</span> connectSlots();
<a name="l00189"></a>00189 <span class="keyword">protected</span>:
<a name="l00190"></a>00190         <span class="keyword">virtual</span> <span class="keywordtype">void</span> initWidget( QWidget *widget, <a class="code" href="classaDatabase.html" title="Класс для работы с СУБД. Ananas Data Abstraction Layer. Наследует...">aDatabase</a> *adb );
<a name="l00191"></a>00191         <span class="keyword">virtual</span> <span class="keywordtype">void</span> initContainer( <a class="code" href="classaWidget.html" title="Базовый класс для визуальных объектов. Наследует...">aWidget</a> *widget, <a class="code" href="classaDatabase.html" title="Класс для работы с СУБД. Ananas Data Abstraction Layer. Наследует...">aDatabase</a> *adb );
<a name="l00192"></a>00192         <a class="code" href="classaWidget.html" title="Базовый класс для визуальных объектов. Наследует...">aWidget</a> *parentContainer( QWidget *widget );
<a name="l00193"></a>00193 <span class="keyword">private</span>:
<a name="l00194"></a>00194         QObject*        dbobject;
<a name="l00195"></a>00195         <span class="keywordtype">int</span>             tobj, objid;
<a name="l00196"></a>00196         <span class="keywordtype">int</span>             mode;
<a name="l00197"></a>00197         Q_ULLONG        id;
<a name="l00198"></a>00198         Q_ULLONG        db_uid;
<a name="l00199"></a>00199         <span class="keywordtype">bool</span>            RO;
<a name="l00200"></a>00200         <a class="code" href="classaWidget.html" title="Базовый класс для визуальных объектов. Наследует...">aWidget</a>*        mainWidget;
<a name="l00201"></a>00201         <a class="code" href="classaWidget.html" title="Базовый класс для визуальных объектов. Наследует...">aWidget</a>*        callerWidget;
<a name="l00202"></a>00202 };
<a name="l00203"></a>00203 
<a name="l00204"></a>00204 
<a name="l00205"></a>00205 <span class="preprocessor">#endif // AFORM_H</span>
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Документация по Ananas Library. Последние изменения: Sun Feb 1 21:47:14 2009. Создано системой&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>
</body>
</html>
